{
 "cells": [
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-11-29T09:08:15.534348Z",
     "start_time": "2024-11-29T09:08:15.532802Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 从huggingface上加载pg19数据集的测试集不分\n",
    "\n",
    "from datasets import load_dataset\n",
    "\n",
    "dataset = load_dataset('pg19', split='test')"
   ],
   "id": "dbb2862592ea6763",
   "outputs": [],
   "execution_count": 3
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "# 查看数据集的信息\n",
    "dataset"
   ],
   "id": "5079fdb8cdf30010"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "# 打印数据集的前2个样本\n",
    "print(dataset['train'][0])\n",
    "print(dataset['train'][1])"
   ],
   "id": "804fa4da3ffacdc5"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "21fa727f614561d8"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
